package com.wulijie.proxy.test1;

/**
 * @Author cui
 * @Data
 */
public class ProxyFactory implements ITeacher{
    private ITeacher teacher;

    public ProxyFactory(ITeacher teacher) {
        this.teacher = teacher;
    }

    @Override
    public void teach() {
        System.out.println("代理之前");
        this.teacher.teach();
        System.out.println("代理之后");
    }
}
